package com.zdp.test.deserialize.entitiy;

import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @describte:TODO
 * @program:ThoughtTest
 * @author:zhengdp
 * @create:2021-12-26 18:23:20
 **/
@Data
public class MessageInfo implements Serializable {

    private String username;
    private String password;
    private int age;
    private HashMap<String,String> params;

    public static MessageInfo buildMessage() {
        MessageInfo messageInfo = new MessageInfo();
        messageInfo.setUsername("abcdefg");
        messageInfo.setPassword("123456789");
        messageInfo.setAge(27);
        HashMap<String,String> map = new HashMap<>();
        for(int i = 0; i< 20; i++) {
            map.put(String.valueOf(i),"a");
        }
        messageInfo.setParams(map);
        return messageInfo;
    }
}
